package xyz.riceball.common.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.riceball.common.entity.dto.SysLogDTO;
import xyz.riceball.common.entity.po.SysLogPO;

import javax.servlet.http.HttpServletRequest;


/**
 * 系统日志查看 Service接口层
 *
 * @author xiaovcloud
 * @since 2022-07-26 19:18:41
 */
public interface SysLogService extends IService<SysLogPO> {

    /**
     * 分页查询日志
     *
     * @param page
     * @param sysLogDTO
     * @return
     */
    Page<SysLogPO> selectPage(Page<SysLogPO> page, SysLogDTO sysLogDTO);

    /**
     * 保存错误异常日志
     *
     * @param sysLogPO
     * @param request
     * @param e
     * @return
     */
    boolean saveErrorSysLog(SysLogPO sysLogPO, HttpServletRequest request, Throwable e);

    /**
     * 保存正常日志
     *
     * @param sysLogPO
     * @param request
     * @return
     */
    boolean saveInfoSysLog(SysLogPO sysLogPO, HttpServletRequest request);
}

